<form name="personalprofile" method="post" action="index.php?mode=service&page=personalprofile&service=submit">
    <table>
    <tr><td valign="top">
        <fieldset class="defaultfieldset">
        <legend>Password change</legend>
        <table class="formtable" width="100%" height=125>
        <tr><td valign="top"><label style="position:relative;top:15px;">New password</label></td><td><input type="password" name="password" value=""></td></tr>
        <tr><td valign="top"><label style="position:relative;top:15px;">New password again</label></td><td><input type="password" name="password2" value=""></td></tr>
        </table>
        </fieldset>
    </table>
    <input type="hidden" name="delete" value="0">
    <<$captcha>>
    <table>
    <tr><td><<jqbutton style="width:180px;" title="Save profile" onclick="savePersonalProfile(); return false;">></td><td>
    <div style="position:relative;">
    <<jqbutton style="width:180px;" title="Delete registration" onclick="deleteRegistration(); return false;">>
    <div id="delete_pw" style="display:none; position:absolute; left:0px; top:40px;">
        Type your password: <input type="password" name="removepassword"><br>
        <button style="width:180px;" onclick="deleteRegistration2(); return false;">Delete registration</button>
    </div>
    </div>
    </td></tr>
    </table>
</form>

<script>

function savePersonalProfile() {
    jQuery("input[name='delete']").val("0");
    submitForm("personalprofile");
}

function deleteRegistration() {
    jQuery("div#delete_pw").show("fade", {}, 300);
/*
    if (confirm("Are you sure to delete your registration? You will not be able to log in to the portal anymore")) {
        jQuery("input[name='delete']").val("1");
        submitForm("personalprofile");
    }
*/
}

function deleteRegistration2() {
    jQuery("input[name='delete']").val("1");
    submitForm("personalprofile");
}

</script>

<<include file="layout/accessories.tpl">>
